]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Fix leaking signal connections
authorMichele <micxgx@gmail.com>
Wed, 4 Mar 2015 00:51:19 +0000 (00:51 +0000)
committerAdel Gadllah <adel.gadllah@gmail.com>
Wed, 4 Mar 2015 11:56:35 +0000 (12:56 +0100)
The overview has a longer life-time than dash items, so we are leaking a
signal connection each time an item is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=745570

js/ui/appDisplay.js

index 9f505586e9f723cf10e667c9f81e08c776b6e543..1df417f0e506d7cccbceb951a063d7ae36f777a2 100644 (file)
@@ -1702,7 +1702,10 @@ const AppIcon = new Lang.Class({
                 if (!isPoppedUp)
                     this._onMenuPoppedDown();
             }));
-            Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); }));
+            let id = Main.overview.connect('hiding', Lang.bind(this, function () { this._menu.close(); }));
+            this.actor.connect('destroy', function() {
+                Main.overview.disconnect(id);
+            });
 
             this._menuManager.addMenu(this._menu);
         }